package cn.kevinkun.Tween.helpers;

import java.util.HashMap;
import java.util.Map;

import com.google.appinventor.components.common.OptionList;

public enum Property implements OptionList<String> {
	X("X"), Y("Y"), TranslationX("TranslationX"), TranslationY("TranslationY"), ScaleX("ScaleX"), ScaleY("ScaleY"),
	RotationX("RotationX"), RotationY("RotationY"), RotationZ("RotationZ"), BackgroundColor("BackgroundColor"),
	TextColor("TextColor");

	private String prop;
	private static final Map<String, Property> lookup;

	private Property(String prop) {
		this.prop = prop;
	}

	public String toUnderlyingValue() {
		return this.prop;
	}

	static {
		lookup = new HashMap<String, Property>();
		for (Property prop : values()) {
			lookup.put(prop.toUnderlyingValue(), prop);
		}
	}

	public static Property fromUnderlyingValue(String prop) {
		return (Property) lookup.get(prop);
	}
}
